# -*- coding: utf-8 -*-
"""
    moe.answers.forms
    ~~~~~~~~~~~~~~~~~

    Q&A forms.

    :copyright: 2009 by tipfy.org.
    :license: BSD, see LICENSE.txt for more details.
"""
from wtforms import fields as f, validators as v

from tipfy.i18n import lazy_gettext

from moe.forms import BaseForm, TagsField


class QuestionForm(BaseForm):
    title = f.TextField(
        label=lazy_gettext('Title'),
        validators=[v.Required(), v.Length(min=10, max=255)]
    )
    body_raw = f.TextAreaField(
        label=lazy_gettext('Question'),
        validators=[v.Required()]
    )
    tags = TagsField(
        label=lazy_gettext('Tags'),
        validators=[v.Required()]
    )
